*******************************************************************************
**                     Replication Instructions                              **
**                                                                           **
**"Can the Poor Organize? Public Goods and Self-Help Groups in Rural India"  **
**                                                                           **
*******************************************************************************



*******************************************************************************
*              1. Required Stata Software Packages                            *
*******************************************************************************

The following user-written commands are required for replication:

(1) kappa.do - module to generate Krippendorff's alpha for concordances

(2) brl.do - module to run regressions with bias-reduced linearization, 
    available at https://economics.byu.edu/frandsen/Pages/software.aspx

(3) cgmwildboot.do; cgmreg.do - modules to run regression with wild-t bootstrap,
    available at https://sites.google.com/site/judsoncaskey/data

(4) psmatch2.do - module to perform propensity matching

(5) ebalance.do - module to perform entropy balancing

(6) rbounds.do - module to perform Rosenbaum bounds analysis

(7) estout.do; outreg.do - modules to generate table output

(1), (4), (5), (6), and (7) are available from the Stata Statistical Software
Components (SSC) archive by entering the command: ssc install <module name>


******************************************************************************
*                      2. Do-File Descriptions                               *
******************************************************************************

(1) Replication.do - Stata do-file containing all code to replicate all results

(2) Do files to replicate survey analysis:

	(a) Survey Variables.do - Stata code to generate variables for analysis of survey data

	(b) Strata.do - Stata code to assign strata (needed for survey analysis)

	(c) Concordance Scores_Ratings.do - Stata code to calculate concordance alphas based on
	    raters' assessment of public goods quality

	(d) Concordance Scores_Rankings.do - Stata code to calculate concordance alphas based on
	    raters' prioritization of public goods

(3) Village Variables.do - Stata code to generate variables for analysis of village-panel data

(4) Games Variables.do - Stata code to generate variables for analysis of public goods games.


******************************************************************************
*                           3. Data files                                    *
******************************************************************************

SHG Survey.dta - full survey results

Village Panel and Census.dta - village-panel summaries of survey results and All India Census (2011)

Public Goods Games.dta - public goods/behavioral game results


******************************************************************************
*                      4. Program Run Instructions                           *
******************************************************************************

Download and save all files to your computer in the same location/directory/subdirectory. 
Open "Replication.do." Note that path to files must be set prior to running replication.
Use Stata change-directory command;  cd "PATH" where PATH = directory path in which unzipped files have been stored.
In the command line, replace "<ETC>" with your file path for either Mac OSX or Windows.

Once this is done, full replication is ready to run.

Note: this replication will generate several tables (in comma-delimited format) in the working directory.
When replicating these results more than once, “replace” will have to be added to the table commands
(esttab and outreg) after the comma. In addition, the command “eststo clear” will have to be entered
prior to re-running “eststo” to drop all estimation sets previously stored. 


   